import request from '@/utils/request'

// 查询学生考勤信息列表
export function listAttendance(query) {
  return request({
    url: '/edu/attendance/list',
    method: 'get',
    params: query
  })
}

// 查询学生考勤信息总汇
export function listStudentAttendance(query) {
  return request({
    url: '/edu/attendance/studentAttendance',
    method: 'get',
    params: query
  })
}

// 查询学生考勤信息详细
export function getAttendance(attendId) {
  return request({
    url: '/edu/attendance/' + attendId,
    method: 'get'
  })
}

// 新增学生考勤信息
export function addAttendance(data) {
  return request({
    url: '/edu/attendance',
    method: 'post',
    data: data
  })
}

// 修改学生考勤信息
export function updateAttendance(data) {
  return request({
    url: '/edu/attendance',
    method: 'put',
    data: data
  })
}

// 删除学生考勤信息
export function delAttendance(attendId) {
  return request({
    url: '/edu/attendance/' + attendId,
    method: 'delete'
  })
}

// 导出学生考勤信息
export function exportAttendance(query) {
  return request({
    url: '/edu/attendance/export',
    method: 'get',
    params: query
  })
}

// 查询班级考勤信息总汇
export function listClassAttendance(query) {
  return request({
    url: '/edu/attendance/classAttendance',
    method: 'get',
    params: query
  })
}
